home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
qbprog.EXE
/
CARPAN.BAS
< prev
next >
Wrap
BASIC Source File
|
1995-05-12
|
1KB
|
26 lines
10 ' ASAL CARPANLARA AYIRMA PROGRAMI . YAZAN MURAT NECIOGLU
20 DIM CT(100),CS(100)
30 CLS: INPUT "SAYIYI GIRIN ",SAYI : IF SAYI=0 OR SAYI=1 THEN END
40 IF SAYI>9999999# THEN PRINT:PRINT "LÜTFEN DAHA KÜÇÜK BÿR SAYI GÿRÿN !...":END
50 CLS: L=LEN(STR$(SAYI))-2: QQ=1 :R=SAYI
60 LOCATE 22,1 : PRINT "ÇARPANLAR HESAPLANIYOR.LÜTFEN BEKLEYÿN !..."
70 WHILE SAYI<>1
80 IF B=1 THEN 100
90 IF A=2 THEN A=A+1 ELSE A=A+2
100 C=SAYI/A
110 IF INT(C)=C THEN Q=Q+1:GOSUB 210:CS(QQ)=CS(QQ)+1:CT(QQ)=A:B=1:SAYI=C:GOTO 130
120 B=0:IF CT(QQ)<>0 THEN QQ=QQ+1:
130 WEND: IF Q>18 THEN CLS:Q=1
140 LOCATE Q+3,1:R$=STR$(R):U=LEN(R$):PRINT RIGHT$(R$,U-1)+" ="
150 FOR T= 1 TO QQ:WW=WW+3
160 SC$=STR$(CT(T)):UU=LEN(SC$):
170 LOCATE Q+3,T+WW+L:PRINT STR$(CT(T))
180 LOCATE Q+2,T+WW+L+UU-1:IF CS(T)=1 THEN PRINT " " ELSE PRINT STR$(CS(T))
190 NEXT: LOCATE Q+3,T+WW+L+UU-1
200 LOCATE 22,1:PRINT " ":END
210 IF Q>20 THEN RETURN
220 LOCATE Q,1:PRINT SAYI :
230 LOCATE Q,3+L:PRINT CHR$(179):
240 LOCATE Q,4+L:PRINT A:
250 RETURN:'*******************************************************************